{{#dataset-table fields=filteredRelationships class="relationship-table" as |relationTable|}}
  {{#relationTable.head as |head|}}
    {{#head.column class="relationship-table__dataset"}}Dataset{{/head.column}}
    {{#head.column class="relationship-table__type"}}

      {{#nacho/dropdown/hover-dropdown
        dropDownItems=relationshipTypes
        selectedDropDown=selectedRelationshipType
        onSelect=(action "onTypeSelect") as |dd|}}
        {{dd.content}}
      {{/nacho/dropdown/hover-dropdown}}

    {{/head.column}}
    {{#head.column class="relationship-table__platform"}}Platform{{/head.column}}
    {{#head.column class="relationship-table__actor"}}Actor{{/head.column}}
    {{#head.column class="relationship-table__modified"}}Last Modified{{/head.column}}
  {{/relationTable.head}}

  {{#relationTable.body as |body|}}
    {{#each relationTable.data as |lineage|}}
      {{#body.row field=lineage as |row|}}
        {{#row.cell}}
          {{#link-to 'datasets.dataset' 'urn' (query-params urn=lineage.dataset.uri)}}
            <strong>
              {{lineage.dataset.nativeName}}
            </strong>
          {{/link-to}}
        {{/row.cell}}
        {{#row.cell}}
          {{titleize lineage.type}}
        {{/row.cell}}
        {{#row.cell}}
          {{titleize lineage.dataset.platform}}
        {{/row.cell}}
        {{#row.cell}}
          {{lineage.actor}}
        {{/row.cell}}
        {{#row.cell}}
          {{moment-calendar lineage.dataset.modifiedTime sameElse="MMM Do YYYY, h:mm a"}}
        {{/row.cell}}
      {{/body.row}}
    {{/each}}
  {{/relationTable.body}}

  {{#if hasMore}}
    {{#relationTable.foot}}
      <td colspan="4" class="text-center">
        <button
          {{action "onToggleShowMore"}}
          class="nacho-button--large nacho-button--tertiary">
          {{#if showAllRelationships}}

            See Less <span class="fa fa-caret-up" aria-label="See less relationships"></span>

          {{else}}

            See More <span class="fa fa-caret-down" aria-label="See more relationships"></span>

          {{/if}}
        </button>
      </td>
    {{/relationTable.foot}}
  {{/if}}
{{/dataset-table}}